import { axios } from '@/utils/request'

export function importTransCode(formData){
  return axios({
    url: '/transcode/uploadCode',
    method: 'post',
    data:formData,
    headers: {
      'Content-Type':
        'multipart/form-data;boundary=' + new Date().getTime(),
    },
  })
}

export function getTranCodeList(){
  return axios({
    url:'/transcode/getTranCodeList',
    method:'get',
  })
}

export function getTranStatus(){
  return axios({
    url:'/tranStatus/getStatusList',
    method:'get',
  })
}

export function getTranList(trans,currentpage,pageSize){
  return axios({
    url:'/transcode/getTranList',
    method:'post',
    data:{'trans':trans,'currentpage':currentpage,'pageSize':pageSize}
  })
}

export function checkInput(data){
  return axios({
    url:'/trans/checkInput',
    method:'post',
    data
  })
}

export function getCode(data){
  return axios({
    url:'/trans/getCode',
    method:'post',
    data:{'check':data}
  })
}
export function downloadlogs(){
  return axios({
    url:'/trans/downloadlogs',
    method:'get',
    responseType:'blob'
  })
}
export function downloadcode(){
  return axios({
    url:'/trans/downloadcode',
    method:'get',
    responseType:'blob'
  })
}